<template>
	<view class="notice">
		<view class="main">
			<image v-if="info.image" :src="$IMG_URL + info.image" mode=""></image>
			<view class="title"> {{info.title}} </view>
			<view class="time"> {{info.createtime}} </view>
			<view class="neirong">
				<!-- <u-parse :html="info.content"></u-parse> -->
        <mp-html :content="info.content" :domain="$IMG_URL" :preview-img="false" :show-img-menu="false"></mp-html>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					
				}
			};
		},
		mounted() {

		},
		onLoad(option) {
			console.log(option.id, "接受id");
			this.$http('common.notices', {
				id:option.id
			}).then(res => {
				this.info = res.data[0]
				console.log(this.info,"+++++++++++")
			});
		},
		methods: {
			fanhui() {
				uni.navigateTo({
					// url: 'test?id=1&name=uniapp'  c传递参数
					url: "/pages/index/index"
				})
			},

		}
	};
</script>

<style lang="scss" scoped>
	.notice {
		background: white;
		height: 100%;
		.name {
			background: white;
			box-shadow: 20rpx 0rpx 14rpx 10rpx #F0F0F0;
			text-align: center;
			position: relative;
			overflow: hidden;
			padding: 36rpx 0;
			// color: white;
			font-weight: bold;
			font-size: 30rpx;

			image {
				width: 39rpx;
				height: 39rpx;
				position: absolute;
				left: 30rpx;
			}
		}

		.main {
			width: 100%;
			padding: 25rpx;
			border-top: 1px solid #CCCCCC;
			image {
				width: 100%;
				// margin:25rpx auto;
			}

			.title {
				text-align: center;
				font-size: 30rpx;
				font-weight: bold;
			}

			.time {
				text-align: center;
				padding: 40rpx 0;
				font-size: 12rpx;
			}

			.neirong {
				// text-indent: 2rem;
				font-size: 30rpx;
				// font-weight: 500;
			}
		}

	}
</style>
